import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MianViewComponent } from './components/mian-view/mian-view.component';
import { Routes, RouterModule} from "@angular/router";
import { ShowPageComponent } from './components/show-page/show-page.component';
import { JavascriptComponent } from './components/javascript/javascript.component';
import { PythonComponent } from './components/python/python.component';

import {SharedModule} from "../../../shared/shared.module";
import { OverlayModule } from "@angular/cdk/overlay";

import { CdkComponent } from './components/cdk/cdk.component';
import { PanelComponent } from './components/cdk/panel.component';


const routes: Routes = [
  {
    path: '',
    component: MianViewComponent
  },
  {
    path: 'showPage',
    component: ShowPageComponent,
    children: [
      {
        path: 'javascript',
        component: JavascriptComponent,
        data: { keep: true}
      },
      {
        path: 'python',
        component: PythonComponent,
        data: { keep: true}
      },
      {
        path: 'use-cdk',
        component: CdkComponent,
      },
    ]
  },
]

@NgModule({
  declarations: [
    MianViewComponent,
    ShowPageComponent,
    JavascriptComponent,
    PythonComponent,
    CdkComponent,
    PanelComponent
  ],
  imports: [
    SharedModule,
    CommonModule,
    OverlayModule,
    RouterModule.forChild(routes),
  ],
})
export class DashbordModule { }
